package com.example.famhealing.timeline;

import android.content.Context;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;

import com.example.famhealing.R;

public class CustomEditText extends EditText {
 
 private final static int EVENT_HIDDEN_KEYEPAD = 1002;
 private Handler mHandler;
 Context context;
 
 public CustomEditText(Context context) {
  super(context);
  this.context=context;
 }
 public CustomEditText(Context context, AttributeSet attributeSet) {
  
	 super(context, attributeSet);
	 this.context=context;
  
 }
 
 public void setHandler(Handler handler) {
  mHandler = handler;
 }
 
 public boolean onKeyPreIme(int keyCode, KeyEvent event) {
  if(event.getAction() == KeyEvent.ACTION_DOWN) {
   if(keyCode == KeyEvent.KEYCODE_BACK) {
	   
	   HealingTimelineActivity healing=new HealingTimelineActivity();
	   healing.invisible();
   }
  }
  return super.onKeyPreIme(keyCode, event);
 }
}
